The present invention relates to data filtering, and more particularly, to a signal adaptive filtering method for reducing blocking effect and ringing noise, a signal adaptive filter and a computer readable medium for storing a program therefor.
Generally, picture encoding standards such as MPEG of the International Standardization Organization (ISO) and H.263 recommended by the International Telecommunication Union (ITU) adopt block-based motion estimation and discrete cosine transform (DCT) blocks. When an image is highly compressed, the block-based coding may cause the well-known blocking effect. A typical blocking effect is grid noise in a homogeneous area in which adjacent pixels have relatively similar pixel values. Another blocking effect is staircase noise which has a staircase shape and is generated along the edges of the image. Also, ringing noise is a typical Gibb""s phenomenon occurring by truncation when the coefficients of the DCT are quantized so as to highly compress the image.
Grid noise shows traces of the block-based process at the edges between blocks when the compressed data is displayed on a screen after being restored. Thus, one can identify the edges between blocks. Also, staircase noise has a staircase shape at the edges of the image, so that one can notice a bumpy edge on the image. Also, one can notice overlapping of images with a predetermined interval due to the ringing noise.
In order to reduce the blocking effect and the ringing noise occurring when block-based coding is performed, several methods have been suggested. According to H.261 encoding, a simple 3xc3x973 low-pass filter (LPF) is used as a loop filter to reduce the blocking effect [xe2x80x9cVideo Codec for Audiovisual Services at Pxc3x9762 kbit/sxe2x80x9d, CCITT Recommendation H.261. Dec. 14, 1990]. Also, a simple edge loop filter has been suggested so as to reduce the blocking effect and mosquito noise [G. Bjontegaard, xe2x80x9cA Simple Edge Loop Filter to Reduce Blocking and Mosquito Noisexe2x80x9d, ISO/IEC JTC1/Sc29/WG11 MPEG96/0617, January, 1996, and xe2x80x9cA Simple Edge Loop Filter to Reduce Blocking and Mosquito Noisexe2x80x9d, ITU SC15 LBC Expert Group ITU-LBC-96-032, January, 1996]. The edge loop filter makes linear values of two pixels adjacent to the block boundary and replaces the two pixel values by the linearized values. Such edge loop filter can reduce the blocking effect but not the ringing noise. In order to reduce the ringing noise, a non-linear filter using a binary index has been suggested [Y.Itoh, xe2x80x9cDetail Preserving Nonlinear Filter using Binary Index, xe2x80x9cISO/IEC JTC1/SC29/WG11 MPEG95/0357, November, 1995]. However, the non-linear filter cannot reduce the blocking effect.
To solve the above problems, it is an object of the present invention is to provide an signal adaptive filtering method for reducing blocking effect and ringing noise in high compression encoding, a signal adaptive filter, and a computer readable medium.
According to an aspect of the present invention, there is provided a signal adaptive filtering method capable of reducing blocking effect and ringing noise of image data when a frame is composed of blocks of a predetermined size, the method comprising the steps of: (a) generating blocking information for reducing the blocking effect and ringing information for reducing the ringing noise, from coefficients of predetermined pixels of the upper and left boundary regions of the data block when a frame obtained by deconstructing a bitstream image data for inverse quantization is an intraframe; and (b) adaptively filtering the image data passed through inverse quaitization and inverse discrete cosine transform according to the generated blocking information and ringing information.
Preferably, the step (a) further comprises the step of setting the blocking information and ringing information of the previous frame corresponding to a motion vector as blocking information and ringing information of the current frame if the frame is an interframe, and setting the ringing information to xe2x80x9c1xe2x80x9d which represents the image data requiring filtering if a residual signal of the inverse-quantized current block exists, and the blocking information and ringing information are determined according to coefficients of a pixel A located at the upper left corner of the block, a pixel B located to the right of the pixel A and a pixel C located below the pixel A.
Preferably, the blocking information is constituted of horizontal blocking information and vertical blocking information, and the horizontal blocking information is set to xe2x80x9c1xe2x80x9d which means the image data requiring filtering when only the coefficient of the pixel A is not equal to xe2x80x9c0xe2x80x9d or any coefficient of the pixels of the left boundary region of the block is not equal to xe2x80x9c0xe2x80x9d, and the vertical blocking information is set to xe2x80x9c1xe2x80x9d which means the image data requiring filtering when only the coefficient of the pixel A is not equal to xe2x80x9c0xe2x80x9d or any coefficient of the pixels of the upper boundary region of the block is not equal to xe2x80x9c0xe2x80x9d, and the ringing information is set to xe2x80x9c1xe2x80x9d which means the image data requiring filtering when any coefficient of the pixels other than the pixels A, B and C of the block is not equal to xe2x80x9c0xe2x80x9d.
Preferably, the blocking information is constituted of horizontal blocking information and vertical blocking information, and the horizontal blocking information is set to xe2x80x9c1xe2x80x9d which means the image data requiring filtering when all coefficients of the pixels A, B and C of the block are not equal to xe2x80x9c0xe2x80x9d or any coefficient of the pixels of the left boundary region of the block is not equal to xe2x80x9c0xe2x80x9d, and the vertical blocking information is set to xe2x80x9c1xe2x80x9d which means the image data requiring filtering when all coefficients of the pixels A, B and C are not equal to xe2x80x9c0xe2x80x9d or any coefficient of the pixels of the upper boundary region of the block is not equal to xe2x80x9c0xe2x80x9d, and the ringing information is set to xe2x80x9c1xe2x80x9d which means the image data requiring filtering when any coefficient of the pixels other than the pixels A, B and C of the block is not equal to xe2x80x9c0xe2x80x9d.
Preferably, in order to reduce the blocking effect, in the step (b), the horizontal (or vertical) filtering is performed using a weighted filter having a predetermined weighted value when the horizontal (or vertical) blocking information of the block is equal to xe2x80x9c1xe2x80x9d and the ringing information is equal to xe2x80x9c0xe2x80x9d, and when the horizontal (or vertical) blocking information of the block is not equal to xe2x80x9c1xe2x80x9d or the ringing information is not equal to xe2x80x9c0xe2x80x9d. an absolute value of the difference between adjacent pixels and a Q value used as a dividend for quantizing the block are compared, and then filtering is performed with a predetermined value according to the result of the comparison.
According to another aspect of the present invention, there is provided a signal adaptive filter capable of reducing blocking effect and ringing noise of image data when a frame is composed of blocks of a predetermined size, comprising: a mode flag checking unit for checking a flag to determine whether or not a frame is an intraframe or an interframe when a bitstream image data is deconstructed for inverse quantization; an intra filtering information generator for generating blocking information for reducing the blocking effect and ringing information for reducing the ringing noise, from coefficients of predetermined pixels of the upper and left boundary regions of the data block when the frame is determined as an intraframe by the mode flag checking unit; an inter filtering information generator for setting the blocking information and ringing information of the previous frame corresponding to a motion vector as blocking information and ringing information of the current frame if the frame is an interframe, and setting the ringing information to xe2x80x9c1xe2x80x9d if a residual signal of the inverse-quantized current block exists; and an adaptive filter for adaptively filtering the image data passed through an inverse quantizer and an inverse discrete cosine transformer according to the blocking information and the ringing information generated by the intra filtering information generator and the inter filtering information generator.
The invention may be embodied in a general purpose digital computer that is running a program from a computer usable medium, including but not limited to storage media such as magnetic storage media (e.g., ROM""s, floppy disks, hard disks, etc.), optically readable media (e.g., CD-ROMs, DVDs, etc.) and carrier waves (e.g., transmissions over the Internet). Hence, the present invention may be embodied as a computer usable medium.
According to still another aspect of the present invention, there is provided a computer readable medium having embodied thereon a computer program for a signal adaptive filtering capable of reducing blocking effect and ringing noise of image data when a frame is composed of blocks of a predetermined size, wherein the signal adaptive filtering comprises the steps of: (a) generating blocking information for reducing the blocking effect and ringing information for reducing the ringing noise, from coefficients of predetermined pixels of the upper and left boundary regions of the data block when a frame obtained by deconstructing a bitstream image data for inverse quantization is an intraframe; (b) setting the blocking information and ringing information of the previous frame corresponding to a motion vector as blocking information and ringing information of the current frame if the frame is an interframe, and setting the ringing information to xe2x80x9c1xe2x80x9d which represents the image data requiring filtering if a residual signal of the inverse-quantized current block exists; and (c) adaptively filtering the image data passed through the inverse quantization and inverse discrete cosine transform based on the block according to the generated blocking information and ringing information.
Also, there is provided a computer readable medium having embodied thereon a computer program for a method of filtering ringing noise caused when decoding a block-based compressed image data, wherein the ringing noise filtering method comprises the steps of: (a) performing a gradient operation on the block subjected to inverse quantization and inverse discrete cosine transform using predetermined one-dimensional horizontal and vertical gradient operators; (b) generating a binary edge map representing whether or not each pixel is an edge pixel, using an absolute value of the difference between the gradient-operated value of one pixel and the value of the adjacent pixel, and a Q value used as a dividend for quantizing the block; and (c) performing a filtering by applying a predetermined filter window to the generated binary edge map.